package codetop.greedy;

public class Code392 {
    public boolean isSubsequence(String s, String t) {
        if (s.length()>t.length())return false;
        int index0=0;
        int index1=0;
        while (index0<s.length()&&index1<t.length()){
            if (s.charAt(index0)==t.charAt(index1)){
                index0++;
                index1++;
            }else {
                index1++;
            }
        }
        return index0 == s.length();
    }
}
